<?php
require $this->__RAD__ . 'component/global/head.php';
?>

<?php
require $this->__RAD__ . 'component/global/nav.php';
?>

	<!-- 内容 -->
	<div class="wrap">
		<div class="banner">
			<img src="<?= $this->__STATIC__ ?>images/contact/banner.jpg">
		</div>
		<div class="allTitle">
			<div class="width">
                <?php
                require $this->__RAD__ . 'component/global/product_center.php';
                ?>
			</div>
		</div>
		<div class="contact">
			<div class="page1">
				<div class="width">
					<div class="contain">
                        <div class="title">
                            <p>
                                联系方式
                            </p>
                        </div>
                        <div class="cen clearboth">
                            <?= $this->substance ?>
                            <div class="right" id="ditu">
                                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                                <html xmlns="http://www.w3.org/1999/xhtml">
                                <head>
                                    <meta charset="utf-8">
                                    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
                                    <meta name="keywords" content="百度地图,百度地图API，百度地图自定义工具，百度地图所见即所得工具" />
                                    <meta name="description" content="百度地图API自定义地图，帮助用户在可视化操作下生成百度地图" />
                                    <title>百度地图API自定义地图</title>
                                    <!--引用百度地图API-->
                                    <style type="text/css">
                                        html,body{margin:0;padding:0;}
                                        .iw_poi_title {color:#CC5522;font-size:14px;font-weight:bold;overflow:hidden;padding-right:13px;white-space:nowrap}
                                        .iw_poi_content {font:12px arial,sans-serif;overflow:visible;padding-top:4px;white-space:-moz-pre-wrap;word-wrap:break-word}
                                    </style>
                                    <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&amp;ak=9MzNiFoY5oYew3eOWHyOyHNc"></script>
                                    <script type="text/javascript" src="http://api.map.baidu.com/getscript?v=2.0&amp;ak=9MzNiFoY5oYew3eOWHyOyHNc&amp;services=&amp;t=20180629105706"></script>
                                </head>

                                <body>
                                <!--百度地图容器-->
                                <div style="width:100%;height:300px;border:#ccc solid 1px;" id="dituContent"></div>
                                </body>
                                <script type="text/javascript">
                                     //地图
                                         function changeMap(mapx, mapy, mapTit, mapAddr, mapTel) {
                                             var a = mapx,
                                                b = mapy;
                                             var map = new BMap.Map("dituContent");            // 创建Map实例  一定是id
                                             var point = new BMap.Point(a, b);    // 创建点坐标
                                             var sContent ="<div style='margin:0;line-height:1.8;font-size:14px;color:#626776;font-family:Microsoft YaHei;'><div><span style='color:#000;'>公司：</span>" + mapTit + "</div><div><span style='color:#000;'>电话：</span>" + mapTel + "</div></div></div>";
                                             var marker = new BMap.Marker(new BMap.Point(a, b));  // 创建标注
                                             var infoWindow = new BMap.InfoWindow(sContent);      // 创建信息窗口对象
                                             map.addOverlay(marker);              // 将标注添加到地图中
                                             marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
                                             map.centerAndZoom(point, 20);                     // 初始化地图,设置中心点坐标和地图级别。
                                             map.enableScrollWheelZoom();
                                             map.panBy(0, 50)
                                             //绑定标记单击事件
                                             marker.addEventListener("click", function () {
                                                 this.openInfoWindow(infoWindow);
                                                 //图片加载完毕重绘infowindow
                                                 document.getElementById('imgDemo').onload = function () {
                                                     infoWindow.redraw();   //防止在网速较慢，图片未加载时，生成的信息框高度比图片的总高度小，导致图片部分被隐藏
                                                 }
                                             });
                                             map.openInfoWindow(infoWindow, point); //开启信息窗口
                                         }

                                         var lng = "121.460172";
                                         var lat = "31.059000";
                                         var title = "上海骄成机电设备有限公司";
                                         var address = "福建省莆田市涵江区高新区涵港路海西院5-9楼";
                                         var call = "86-021-34668758";
                                         changeMap(lng,lat,title,address,call);
                                     

                                </script>
                                </html>
                            </div>
                        </div>
                    </div>
				</div>
			</div>
		</div>
	</div>

    <?php
    require $this->__RAD__ . 'component/global/right.php';
    ?>

    <?php
    require $this->__RAD__ . 'component/global/footer.php';
    ?>